package com.nycreativity.elecreativity.mapper

import com.nycreativity.elecreativity.entity.po.Favorite
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import com.baomidou.mybatisplus.core.metadata.IPage
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.nycreativity.elecreativity.entity.vo.favorite.FavoriteVO
import org.apache.ibatis.annotations.Param

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-03-11
 */
interface FavoriteMapper : BaseMapper<Favorite> {

    /**
     * 分页查询收藏信息
     * @param iPage Page<Favorite> 分页参数
     * @param userId Long 用户id
     * @return List<FavoriteVO> 收藏信息查询VO集合
     */
    fun selectFavoriteByPage(@Param("page") iPage: Page<Favorite>, @Param("userId") userId: Long?): IPage<FavoriteVO>
}
